/* 全局样式 */
:root {
    --primary-color: #00ffff;
    --secondary-color: #00ff00;
    --dark-bg: #0f0c29;
    --sidebar-width: 250px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #fff;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.nav-item:hover, .nav-item.active {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-color);
}

.logout {
    position: absolute;
    bottom: 20px;
    width: 100%;
    color: #ff4444;
}

/* 主要内容区域 */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

/* 欢迎页面 */
.welcome-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding: 20px;
}

.welcome-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 255, 0.2),
        rgba(0, 255, 255, 0.4),
        rgba(0, 255, 255, 0.2),
        transparent
    );
}

.welcome-header h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    font-family: 'YouYuan', 'STXihei', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(
        45deg,
        var(--primary-color) 20%,
        #fff 50%,
        var(--secondary-color) 80%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleGlow 2s ease-in-out infinite;
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.3),
        0 0 20px rgba(0, 255, 255, 0.2),
        0 0 30px rgba(0, 255, 255, 0.1);
    font-weight: 600;
    letter-spacing: 1px;
}

.welcome-header h1::before,
.welcome-header h1::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color));
}

.welcome-header h1::before {
    left: -60px;
    transform: translateY(-50%);
}

.welcome-header h1::after {
    right: -60px;
    transform: translateY(-50%) rotate(180deg);
}

.welcome-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 15px;
    position: relative;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
    font-weight: 400;
    letter-spacing: 1px;
    font-family: 'Microsoft YaHei', sans-serif;
}

@keyframes titleGlow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        opacity: 0.92;
        transform: scale(1.01);
        filter: brightness(1.15);
    }
}

/* 添加科技感装饰元素 */
.welcome-header::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary-color),
        transparent
    );
    filter: blur(1px);
}

.welcome-header .tech-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0.5;
}

.welcome-header .tech-dots::before,
.welcome-header .tech-dots::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: floatDot 3s ease-in-out infinite;
}

.welcome-header .tech-dots::before {
    top: 20%;
    left: 20%;
    animation-delay: -1s;
}

.welcome-header .tech-dots::after {
    top: 20%;
    right: 20%;
    animation-delay: -2s;
}

@keyframes floatDot {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.5;
    }
    50% {
        transform: translate(0, -10px);
        opacity: 1;
    }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* 实验课程页面 */
.search-bar {
    display: flex;
    margin-bottom: 30px;
    max-width: 600px;
}

.search-bar input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px 0 0 5px;
    color: #fff;
}

.search-bar button {
    padding: 10px 20px;
    background: var(--primary-color);
    border: none;
    border-radius: 0 5px 5px 0;
    color: #000;
}

.experiment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.experiment-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.experiment-card:hover {
    transform: translateY(-5px);
}

.card-header {
    padding: 20px;
    background: rgba(0, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.card-header i {
    font-size: 2rem;
    margin-right: 15px;
    color: var(--primary-color);
}

.card-body {
    padding: 20px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.card-footer {
    padding: 20px;
    text-align: center;
}

.btn-start {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 10px 30px;
    border-radius: 5px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-start:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* 个人中心页面 */
.profile-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.profile-info {
    display: flex;
    align-items: center;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 20px;
    border: 3px solid var(--primary-color);
}

.section-tabs {
    margin-bottom: 30px;
}

.tab-btn {
    background: none;
    border: none;
    color: #fff;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.tab-btn.active {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-color);
}

.experiment-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-continue {
    background: var(--primary-color);
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    color: #000;
    cursor: pointer;
}

/* 模态框样式 */
.modal-content {
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.experiment-status {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar span {
        display: none;
    }

    .main-content {
        margin-left: 60px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* 实验卡片样式更新 */
.btn-enter {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 10px 30px;
    border-radius: 5px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-enter:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* 实验详情模态框样式 */
.experiment-info {
    padding: 20px;
}

.experiment-info h4 {
    color: var(--primary-color);
    margin: 20px 0 10px;
    font-size: 1.2rem;
}

.experiment-info ul {
    list-style-type: none;
    padding-left: 0;
}

.experiment-info ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.experiment-info ul li:before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.experiment-resources {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: rgba(0, 255, 255, 0.2);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.experiment-status {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.status-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.status-label {
    color: rgba(255, 255, 255, 0.7);
    margin-right: 10px;
}

.status-value {
    color: var(--primary-color);
    font-weight: bold;
}

.container-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.info-label {
    color: rgba(255, 255, 255, 0.7);
    width: 100px;
}

.info-value {
    color: var(--primary-color);
    flex: 1;
    font-family: monospace;
}

.btn-copy {
    background: none;
    border: none;
    color: var(--primary-color);
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

/* 容器控制按钮样式 */
#startContainer, #stopContainer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#startContainer {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: #000;
}

#stopContainer {
    background: linear-gradient(45deg, #ff4444, #ff0000);
    color: #fff;
}

#startContainer:hover, #stopContainer:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

#startContainer:disabled, #stopContainer:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 状态样式更新 */
.status-value {
    font-weight: bold;
    transition: color 0.3s ease;
}

.status-value.running {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.status-value.stopped {
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.status-value.pending {
    color: #ffaa00;
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 实验模态框样式 */
#experimentModal {
    backdrop-filter: blur(20px);
}

#experimentModal .modal-content {
    background: rgba(15, 12, 41, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

#experimentModal .modal-header {
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    padding: 20px;
}

#experimentModal .modal-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 500;
}

#experimentModal .modal-body {
    padding: 25px;
}

.experiment-info {
    color: #fff;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.info-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.info-header h3 {
    font-size: 1.8rem;
    margin: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.info-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.info-meta i {
    color: var(--primary-color);
}

.info-description, .info-guide, .container-info {
    margin-bottom: 25px;
}

.info-description h4, .info-guide h4, .container-info h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.info-description p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-outline-info {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.btn-outline-info:hover {
    background: var(--primary-color);
    color: #000;
    transform: translateY(-2px);
}

.info-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
}

.status-box, .address-box, .timer-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.status-box:last-child, .address-box:last-child, .timer-box:last-child {
    margin-bottom: 0;
}

.status-label, .address-label, .timer-label {
    color: rgba(255, 255, 255, 0.6);
    min-width: 100px;
}

.status-value {
    font-weight: 500;
    transition: all 0.3s ease;
}

.status-value.running {
    color: #00ff00;
}

.status-value.stopping {
    color: #ff9900;
}

.status-value.stopped {
    color: #ff4444;
}

.address-value {
    color: var(--primary-color);
    background: rgba(0, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    flex: 1;
}

.copy-btn {
    padding: 5px 10px;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background: transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: #000;
}

.timer-value {
    color: #ff9900;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
}

#experimentModal .modal-footer {
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    padding: 20px;
    gap: 10px;
}

#experimentModal .btn {
    padding: 10px 25px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#experimentModal .btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: #000;
}

#experimentModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

#experimentModal .btn-danger {
    background: linear-gradient(45deg, #ff4444, #ff0000);
    border: none;
    color: #fff;
}

#experimentModal .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

#experimentModal .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

#experimentModal .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 添加状态切换动画 */
@keyframes statusBlink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.status-value.pending {
    animation: statusBlink 1s infinite;
    color: #ff9900;
}

.welcome-banner {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 8px;
    color: #fff;
    text-align: right;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.welcome-text h2 {
    font-size: 1em;
    margin-bottom: 3px;
    font-weight: 500;
    color: var(--primary-color);
}

.welcome-text p {
    font-size: 0.8em;
    opacity: 0.8;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

#welcomeUsername {
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.environment-switch {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin: 0 10px;
}

.environment-switch .env-label {
    display: block;
    color: #fff;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.environment-switch .env-label i {
    margin-right: 5px;
}

.environment-switch .env-select {
    width: 100%;
    padding: 5px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #333;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.environment-switch .env-select:hover {
    background: #fff;
}

.environment-switch .env-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
} 